import java.util.Scanner;
public class Fourth{
	public static void main(String[] args){
	Scanner sc =new Scanner(System.in);
	System.out.println("Please enter the online shopping amount:");
	Double price =sc.nextDouble();
	System.out.println("Please enter the distance between the customer and the shopping point:");
	Double distance  =sc.nextDouble();
	if (distance >=0&&distance<=10){
	System.out.println("The total amount required is:"+(price+10));
	}else if (distance >=11&&distance<=50){
	System.out.println("The total amount required is:"+(price+50));
	}else if (distance >=51&&distance<=100){
	System.out.println("The total amount required is:"+(price+100));
	}else{
	System.out.println("The total amount required is:"+(price+100));
	}
	}
}